<template>
  <div>
    <el-table
      :data="tableData"
      border
      style="width: 100%"
      :header-cell-style="{ color: 'black', fontSize: '18px' }"
    >
      <el-table-column type="index" width="100" label="序号"> </el-table-column>
      <el-table-column
        :prop="prop"
        :label="lable"
        width="180"
        v-for="(lable, prop, index) in header"
        :key="index"
        highlight-current-rows
      >
      </el-table-column>
      <el-table-column label="操作" fixed="right" width="200">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="warning"
            @click="$emit('editInfo', scope.row)"
            style="margin: 0 20px"
            >编辑</el-button
          >
          <el-button
            size="mini"
            type="danger"
            @click="$emit('deleteEmployee', scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  name: "TableTemplate",
  props: ["header", "tableData", "title"],
};
</script>

<style lang="less" scoped>
.el-table {
  opacity: 0.6;
  color: black;
  // font-weight: 700;
  font-size: 16px;
  .el-table-column {
    color: black;
  }
}
</style>
